<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>导航栏</title>
    <style>
        .nav a {
            display:inline-block;
            width: 80px;
            height: 80px;
            line-height: 80px;
            background-color: aqua;
            text-align: center;
            color: #fff;
            text-decoration: none;
        }
        .nav .bg1 {
            background: url(images/bg1.jpg) no-repeat;
            background-size: 80px 80px;
        }
        .nav .bg2 {
            background: url(images/bg2.jpg) no-repeat;
            background-size: 80px 80px;
        }
        .nav .bg1:hover {
            background-image: url(images/bg3.jpg);
        }
        .nav .bg2:hover {
            background-image: url(images/bg4.jpg);
        }

    </style>
</head>
<body>
    <div class="nav">
        <a href="#" class="bg1">变换</a>
        <a href="#" class="bg2">变换</a>
    </div>
</body>
</html>